package com.kifas.entity;

import java.io.Serializable;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name = "tb_jenis_customer")
public class JenisCustomerEntity implements Serializable {

	private static final long serialVersionUID = -2590125630706269730L;

	@Id
	@GeneratedValue
	@Column(name = "id_jenis_customer")
	private Long idJenisCustomer;
	@Column(name = "jenis_customer")
	private String jenisCustomer;

	@OneToMany(mappedBy = "jenisCustomer", targetEntity = CustomerEntity.class, fetch = FetchType.LAZY)
	private Set<CustomerEntity> customers;
	
	@Column(name= "created_by")
	private String createdBy;

	public JenisCustomerEntity() {
	}

	public JenisCustomerEntity(Long idJenisCustomer, String jenisCustomer) {
		this.idJenisCustomer = idJenisCustomer;
		this.jenisCustomer = jenisCustomer;
	}
	
	public JenisCustomerEntity(Long idJenisCustomer, String jenisCustomer, String createdBy) {
		this.idJenisCustomer = idJenisCustomer;
		this.jenisCustomer = jenisCustomer;
		this.createdBy = createdBy;
	}

	public Long getIdJenisCustomer() {
		return idJenisCustomer;
	}

	public void setIdJenisCustomer(Long idJenisCustomer) {
		this.idJenisCustomer = idJenisCustomer;
	}

	public String getJenisCustomer() {
		return jenisCustomer;
	}

	public void setJenisCustomer(String jenisCustomer) {
		this.jenisCustomer = jenisCustomer;
	}

	public Set<CustomerEntity> getCustomers() {
		return customers;
	}

	public void setCustomers(Set<CustomerEntity> customers) {
		this.customers = customers;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	public String getCreatedBy() {
		return createdBy;
	}

}
